HDDS-1783 : Latency metric for applyTransaction in ContainerStateMach…#1363
HDDS-1783 : Latency metric for applyTransaction in ContainerStateMach…#1363bshashikant merged 6 commits intoapache:trunkfrom
Conversation
|
/label ozone |
|
Thanks @avijayanhwx for working on this. The changes look good. In applyTransaction, we execute different cmds which will vary with latency. For example, for a write chunk commit, its a rename operation but for putBlock , it is Rocks DB operation and for close container, its again a disk sync operation of container state. Depending upon the operation the latency will vary as well. Can we have per cmd latency metric? |
...rc/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/CSMMetrics.java
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
@bshashikant Isn't the per operation latency covered in org.apache.hadoop.ozone.container.common.transport.server.ratis.CSMMetrics#opsLatency? This metric was only intended to cover the whole latency including thread scheduling. |
|
Thanks @avijayanhwx . Yes, the per op applyTransaction latency metrics is already there but we don't have writeStateMachineData latency metric which again runs in a different executor. Can we add that as well. This can be done as a separate jira as well. |
…ine. (Add a rate metric for WriteStateMachineData)
…ine. (Fix compilation issue)
Added rate metric for writeStateMachineData as well. |
|
💔 -1 overall
This message was automatically generated. |
|
Thanks @avijayanhwx for updating. Can we also add some tests for the added metric in TestCSMMetrics ? |
Added unit test for the metrics. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Thanks @avijayanhwx for working on this. I am +1 on the change. |
|
Thanks @avijayanhwx for the contribution. I have committed this. |
…ine.
applyTransaction is invoked from the Ratis pipeline and the ContainerStateMachine uses a async executor to complete the task.
We require a latency metric to track the performance of log apply operations in the state machine. This will measure the end-to-end latency of apply which includes the queueing delay in the executor queues. Combined with the latency measurement in HddsDispatcher, this will be an indicator if the executors are overloaded.